cmake_minimum_required(VERSION 3.10)
#add_definitions(-std=c++17)

project(LENET)

SET(CMAKE_SYSTEM_NAME Linux)
# SET(CMAKE_SYSTEM_PROCESSOR riscv)
# SET(CMAKE_C_COMPILER /root/chipyard/esp-tools-install/bin/riscv64-unknown-linux-gnu-gcc)
# SET(CMAKE_CXX_COMPILER /root/chipyard/esp-tools-install/bin/riscv64-unknown-linux-gnu-g++)

SET(CMAKE_SYSTEM_PROCESSOR x86)
SET(CMAKE_C_COMPILER /usr/bin/gcc-8)
SET(CMAKE_CXX_COMPILER /usr/bin/g++-8)

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -g ")
SET(CMAKE_CXX_FLAGS "-std=c++17 ${CMAKE_CXX_FLAGS} -g ")

# FIND_PACKAGE( OpenMP REQUIRED)
# if(OPENMP_FOUND)
# message("OPENMP FOUND")
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
# endif()

include_directories( ./include)
# include_directories( ./include/riscv)

link_libraries(stdc++fs )
aux_source_directory(./src SRC_LIST)

add_executable(cnn ${SRC_LIST})
